//
//  FANComposeButton.m
//  Weibo - OC
//
//  Created by user on 16/4/25.
//  Copyright © 2016年 user. All rights reserved.
//

#import "FANComposeButton.h"

@implementation FANComposeButton

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        [self setupUI];
    }
    
    return self;
}

- (void)setHighlighted:(BOOL)highlighted{
    
    
}

- (void)setupUI{
    
    self.imageView.contentMode = UIViewContentModeScaleAspectFill;
    
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
}

- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    self.imageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.width);
    
    self.titleLabel.frame = CGRectMake(0, self.frame.size.width, self.frame.size.width, self.frame.size.height - self.frame.size.width);
}

@end
